#ifndef RECTCELL_HPP
#define RECTCELL_HPP

#include "structCellBase.hpp"

namespace hms {

template<>
class CellTraits<RectCell> : public StructCellTraits
{
public:
	using MeshType     = RectMesh;
	using CentroidType =
		#ifdef RECTMESH_PRECALC_CENTROIDS
			Matrix2Xs::ConstColXpr;
		#else
			Vector2s;
		#endif
};

class RectCell : public StructCellBase<RectCell>
{
public:
	using Traits = CellTraits<RectCell>;
	using MeshType     = Traits::MeshType;
	using CentroidType = Traits::CentroidType;

private:
	RectCell( const RectMesh&, Index );
	RectCell( const RectMesh&, Index, Index );

	auto areaImp    () const -> scalar;
	auto circumfImp () const -> scalar;
	auto centroidImp() const -> CentroidType;

	friend CellBase;
	friend StructMeshBase<RectMesh>;
};
}

#endif